-- GENERATED SPELL FOR [Blackfathom Sea Witch] --


function spell0_4805(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_4805', 0, 1)
end

function spell1_4805(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(122,pUnit)
pUnit:RegisterEvent('Sorts_4805', 8000, 1)
end

function spell2_4805(pUnit, Event) --@Frost Ward,Self--
pUnit:FullCastSpellOnTarget(6143,pUnit)
pUnit:RegisterEvent('Sorts_4805', 30000, 1)
end

function Sorts_4805(pUnit, Event)
local choix_sorts_4805 = math.random(0, 2)
if choix_sorts_4805 == 0 then
pUnit:RegisterEvent('spell0_4805', 1, 1)
end
if choix_sorts_4805 == 1 then
pUnit:RegisterEvent('spell1_4805', 1, 1)
end
if choix_sorts_4805 == 2 then
pUnit:RegisterEvent('spell2_4805', 1, 1)
end
end

function mob4805_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4805', math.random(1500, 3000), 1)
end

function mob4805_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4805_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4805_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4805, 1, 'mob4805_Action')
RegisterUnitEvent(4805, 2, 'mob4805_Leave')
RegisterUnitEvent(4805, 3, 'mob4805_Kill')
RegisterUnitEvent(4805, 4, 'mob4805_Die')
